package com.slz3.business.module.messageManagement.mesSystem.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.messageManagement.mesSystem.domain.MesSystem;
import com.slz3.business.module.messageManagement.mesSystem.domain.MesSystemCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MesSystemResAtomic {

    static Mono<ServerResponse> add_$MesSystemUpdateLock(ServerRequest req, MesSystem mesSystem) {
        return MesSystemResSafeValid.add(req, mesSystem) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.add(req, mesSystem);
    }

    public static Mono<ServerResponse> delete_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.delete(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$MesSystemUpdateLock(ServerRequest req, MesSystem mesSystem) {
        return MesSystemResSafeValid.modify(req, mesSystem) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.modify(req, mesSystem);
    }

    static Mono<ServerResponse> info_$MesSystemUpdateLock(ServerRequest req) {
        return MesSystemResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.auditSubmit(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.audit(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.auditReject(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.usingEnable(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$MesSystemUpdateLock(ServerRequest req, MesSystemCondition mesSystemCondition) {
        return MesSystemResSafeValid.usingDisable(req, mesSystemCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesSystemResExecutor.usingDisable(req);
    }
}
